add_library(SwiftLanguageService STATIC
  AdjustPositionToStartOfArgument.swift
  AdjustPositionToStartOfIdentifier.swift
  ClosureCompletionFormat.swift
  CodeActions/AddDocumentation.swift
  CodeActions/ConvertIntegerLiteral.swift
  CodeActions/ConvertJSONToCodableStruct.swift
  CodeActions/ConvertStringConcatenationToStringInterpolation.swift
  CodeActions/PackageManifestEdits.swift
  CodeActions/RemoveUnusedImports.swift
  CodeActions/SyntaxCodeActionProvider.swift
  CodeActions/SyntaxCodeActions.swift
  CodeActions/SyntaxRefactoringCodeActionProvider.swift
  CodeCompletion.swift
  CodeCompletionSession.swift
  CommentXML.swift
  CursorInfo.swift
  Diagnostic.swift
  DiagnosticReportManager.swift
  DocumentFormatting.swift
  DocumentSymbols.swift
  ExpandMacroCommand.swift
  FoldingRange.swift
  GeneratedInterfaceManager.swift
  InlayHints.swift
  MacroExpansion.swift
  OpenInterface.swift
  SwiftPlaygroundsScanner.swift
  RefactoringEdit.swift
  RefactoringResponse.swift
  RelatedIdentifiers.swift
  Rename.swift
  RewriteSourceKitPlaceholders.swift
  SemanticRefactorCommand.swift
  SemanticRefactoring.swift
  SemanticTokens.swift
  SignatureHelp.swift
  SwiftCodeLensScanner.swift
  SwiftCommand.swift
  SwiftLanguageService.swift
  SwiftTestingScanner.swift
  SymbolGraph.swift
  SymbolInfo.swift
  SyntacticSwiftXCTestScanner.swift
  SyntaxHighlightingToken.swift
  SyntaxHighlightingTokenParser.swift
  SyntaxHighlightingTokens.swift
  SyntaxTreeManager.swift
  TestDiscovery.swift
  VariableTypeInfo.swift
)
set_target_properties(SwiftLanguageService PROPERTIES
  INTERFACE_INCLUDE_DIRECTORIES ${CMAKE_Swift_MODULE_DIRECTORY})
target_link_libraries(SwiftLanguageService PUBLIC
  BuildServerIntegration
  Crypto
  SwiftToolsProtocols::LanguageServerProtocol
  SKOptions
  SourceKitD
  SourceKitLSP
  ToolchainRegistry
  IndexStoreDB
  SwiftSyntax::SwiftBasicFormat
  SwiftSyntax::SwiftSyntax
)

target_link_libraries(SwiftLanguageService PRIVATE
  SwiftToolsProtocols::BuildServerProtocol
  Csourcekitd
  LanguageServerProtocolExtensions
  SwiftToolsProtocols::LanguageServerProtocolTransport
  SemanticIndex
  SwiftToolsProtocols::SKLogging
  SKUtilities
  SwiftExtensions
  SwiftToolsProtocols::ToolsProtocolsSwiftExtensions
  TSCExtensions
  TSCBasic
  SwiftSyntax::SwiftDiagnostics
  SwiftSyntax::SwiftIDEUtils
  SwiftSyntax::SwiftParser
  SwiftSyntax::SwiftParserDiagnostics
  SwiftSyntax::SwiftRefactor
  SwiftSyntax::SwiftSyntaxBuilder
  $<$<NOT:$<PLATFORM_ID:Darwin>>:FoundationXML>
)

